import request from '@/utils/request'

// 车辆状态修改
export function changeVehicleStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/basic/vehicle/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询车辆信息表列表
export function listVehicle(query) {
  return request({
    url: '/basic/vehicle/list',
    method: 'get',
    params: query
  })
}

// 查询车辆信息表详细
export function getVehicle(id) {
  return request({
    url: '/basic/vehicle/' + id,
    method: 'get'
  })
}

// 新增车辆信息表
export function addVehicle(data) {
  return request({
    url: '/basic/vehicle',
    method: 'post',
    data: data
  })
}

// 修改车辆信息表
export function updateVehicle(data) {
  return request({
    url: '/basic/vehicle',
    method: 'put',
    data: data
  })
}

// 删除车辆信息表
export function delVehicle(id) {
  return request({
    url: '/basic/vehicle/' + id,
    method: 'delete'
  })
}
